package com.projet.ai;

import cn.hutool.http.HttpRequest;

import java.nio.file.Files;
import java.nio.file.Paths;

public class AiFeedbackTest {
    public static void main(String[] args) {
        try {
            String urlString = "https://assistants.edgenets.io/fix";
            byte[] bytes = Files.readAllBytes(Paths.get("C:\\Users\\Administrator\\Desktop\\ai\\1742891021467.txt"));
            System.out.println("开始访问：" + urlString);
            String response = HttpRequest.post(urlString).timeout(120000)
                    .contentType("application/json")
                    .header("X-API-KEY", "812bec5a6dc8cb83")
                    .body(new String(bytes))
                    .execute().body();
            System.out.println("结束访问：" + urlString);
            System.out.println("结果***********************************");
            System.out.println(response);
            System.out.println("结果***********************************");
        } catch (Exception ex) {
            ex.printStackTrace();
        }

    }
}
